90206: Function test for xfi:concept-substitutions

Documentation

Tests of function xfi:concept-substitutions($concept-name as xs:QName) as xs:QName+

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 05-02-2008 at 16:40:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670666

Test Case Variations


V-01 Returns correct substitutions for c1 concept

Documentation

Tests that c1 concept returns a substitutions of (xbrli:item).

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:concept-substitutions( QName('http://xbrl.org/formula/conformance/example','concept:c1') )

    (against file V01)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq QName('http://www.xbrl.org/2003/instance','xbrli:item')

V-02 Returns correct substitutions for c2 concept

Documentation

Tests that c2 concept returns substitutions of (eg:c1, xbrli:item).

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:concept-substitutions( QName('http://xbrl.org/formula/conformance/example','concept:c2') )

    (against file V02)

Outputs

  • Result test: $result instance of xs:QName+ and count( $result ) eq 2 and $result[1] eq QName('http://xbrl.org/formula/conformance/example','concept:c1') and $result[2] eq QName('http://www.xbrl.org/2003/instance','xbrli:item')

V-03 Returns correct substitutions for t3 tuple

Documentation

Tests that tuple t3 concept has substitutions (t2,t1,xbrli:tuple)

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:concept-substitutions( QName('http://xbrl.org/formula/conformance/example','concept:t3') )

    (against file V03)

Outputs

  • Result test: $result instance of xs:QName+ and count( $result ) eq 3 and $result[1] eq QName('http://xbrl.org/formula/conformance/example','concept:t2') and $result[2] eq QName('http://xbrl.org/formula/conformance/example','concept:t1') and $result[3] eq QName('http://www.xbrl.org/2003/instance','xbrli:tuple')

V-04 Raises an error for non-xbrl element argument

Documentation

Tests that error is detected when the element is not an XBRL concept.

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:concept-substitutions( QName('http://xbrl.org/formula/conformance/example','concept:nonXbrlElement') )

    (against file V04)

Outputs

  • Error code: xfie:invalidConceptQName

V-05 Raises an error for an attribute declaration argument

Documentation

Tests that error is detected when the argument declares an attribute.

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V05)
  • Function Call: xfi:concept-substitutions( QName('http://xbrl.org/formula/conformance/example','concept:anAttribute') )

    (against file V05)

Outputs

  • Error code: xfie:invalidConceptQName

V-06 Raises an error for an xbrli namespace'ed argument

Documentation

Tests that error is detected when the argument is xbrli:item

Inputs

  • schema: concept-substitutions.xsd (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:concept-substitutions( QName('http://www.xbrl.org/2003/instance','xbrli:item') )

    (against file V06)

Outputs

  • Error code: xfie:invalidConceptQName

Revisions

Name On Details
Herm Fischer 05-02-2008 at 16:40:00 Created the test case.